<?php

namespace App\Http\Controllers\Home;

use App\Http\Controllers\Controller;
use App\Models\Quotation;
use Illuminate\Http\Request;

class QuotationsController extends Controller
{

    //语录换一换
    public function change(Request  $request)
    {
        $param = $request->all();
        $id = isset($param['id'])?$param['id']:"";
        $quotations = Quotation::where('id','<>',$id)->inRandomOrder()->take(1)->get();
        $data = [
            'code'=>1,
            'msg'=>'获取成功',
            'data'=>$quotations,
        ];
        return response()->json($data);

    }


}
